package com.xdjd.mobile.business.util;

import java.util.Random;

/**
 * 验证码生成工具类
 */
public abstract class VerifyCodeGenerateUtil {

	/**
	 * 生成数字验证码
	 */
	public static String getNunVerifyCode() {
		char[] base = "1234567890".toCharArray();
		int codeLength = 6;
		Random random = new Random();
		StringBuilder sb = new StringBuilder();
		for (int i = 0; i < codeLength; i++) {
			int position = random.nextInt(base.length);
			sb.append(base[position]);
		}
		return sb.toString();
	}
}
